/****** Object:  Stored Procedure dbo.spr_UpdateDBOrdersDetailByPK  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_UpdateDBOrdersDetailByPK]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_UpdateDBOrdersDetailByPK]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_UpdateDBOrdersDetailByPK]
 (
	@carid int,
	@carprice decimal(10,
 2),
	@clientvisaid int,
	@compid int,
	@driverid int,
	@driverprice decimal(10,
 2),
	@hotelid int,
	@hotelprice decimal(10,
 2),
	@hreservdetails varchar(50),
	@is3rdpartycar bit,
	@is3rdpartydriver bit,
	@orderid int,
	@othertransp varchar(50),
	@remarks varchar(50),
	@srno bigint,
	@transpnoofdays int,
	@transpprice int
 )

 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	UPDATE [OrdersDetail]
	SET
		[CarId] = @carid,
		[CarPrice] = @carprice,
		[ClientVisaId] = @clientvisaid,
		[CompId] = @compid,
		[DriverId] = @driverid,
		[DriverPrice] = @driverprice,
		[HotelId] = @hotelid,
		[HotelPrice] = @hotelprice,
		[HReservDetails] = @hreservdetails,
		[Is3rdPartyCar] = @is3rdpartycar,
		[Is3rdPartyDriver] = @is3rdpartydriver,
		[OrderId] = @orderid,
		[OtherTransp] = @othertransp,
		[Remarks] = @remarks,
		[SrNo] = @srno,
		[TranspNoOfDays] = @transpnoofdays,
		[TranspPrice] = @transpprice

	WHERE
	[CompId] = @compid
	AND [SrNo] = @srno


	SET @Err = @@Error
	RETURN @Err
 END

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

